<template>
  <div class="scroll-container">
    <div class="scroll-title">精选专题 ></div>

    <div class="scroll-wrapper">
      <div class="scroll-item">
        <div class="scroll-item-goods" v-for="item in scrollList" :key="item.id">
          <img :src="item.pic"/>
          <p v-html="item.title" class="p1">{{item.title }}</p>
          <p class="p2">{{item.descript }}</p>
        </div>
      </div>
    </div>

  </div>
</template>
<script>
export default {
    props:{
        scrollList:{
            type:Array,
            required:true,
        }
    }
};
</script>
<style scoped>
.scroll-container{
  height:12rem;
  width:100%;
  background-color: white;
  /* background-color: lightgreen; */
  /* border-bottom:2px solid red; */
}
.scroll-title{
  height: 1.6rem;
  width: 100%;
  font-size: 0.7rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background-color: white;
  /* border:1px solid red; */
}
.scroll-wrapper {
  width: 100%;
  height:10rem;
  /* border:3px solid blue; */
  display: inline-flex;
  overflow: scroll;
}
.scroll-item {
  display:flex;
}
.scroll-item-goods {
  width:100%;
  height:100%;
  /* border:3px solid yellow; */
  margin-left:0.3rem;
}
.scroll-item-goods img {
  width:13rem;
  height:7.5rem;
  display:block;
  border-radius:7px;
  /* margin-left: 0.2rem; */
}
.scroll-item-goods .p1 {
  font-size: 0.3rem;
}
.scroll-item-goods .p2 {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp:1;
  overflow: hidden;
  color:grey;
  font-size:0.5rem;
  margin-top:10px;
}
</style>